package wyf.ytl;

import java.util.ArrayList;

public class randomArrayList {

	public static ArrayList<Card> makeCardsRandom(ArrayList<Card> input) {
		ArrayList<Card> output = new ArrayList<Card>(input.size());
		for (int i = 0; i < input.size(); i++) {
			int n = (int) (Math.random() * (output.size() + 1));
			output.add(n, input.get(i));
		}
		return output;
	}

	public static ArrayList<String> makeStringRandom(ArrayList<String> input) {
		ArrayList<String> output = new ArrayList<String>(input.size());
		for (int i = 0; i < input.size(); i++) {
			int n = (int) (Math.random() * (output.size() + 1));
			output.add(n, input.get(i));
		}
		return output;
	}
}
